<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
</head>

<body>

    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title layui_tab_title">
                    <li class="{$type==1?'layui-this':''}"><a
                            href="{:url('setting/indexlive',array('type'=>1))}">腾讯云COS服务</a></li>
                    <li class="{$type==2?'layui-this':''}"><a
                            href="{:url('setting/indexlive',array('type'=>2))}">腾讯云直播配置</a></li>
                    <li class="{$type==3?'layui-this':''}"><a
                            href="{:url('setting/indexlive',array('type'=>3))}">热度公式配置</a></li>
                    <li class="{$type==4?'layui-this':''}"><a
                            href="{:url('setting/indexpb',array('type'=>4,'source_key'=>'pub'))}">聊天室配置</a></li>
                    <li><a href="{:url('setting/tag')}">标签配置</a></li>
                </ul>
            </div>

            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <div class="layui-tab-content">
                    <div class="layui-tab-item {$type==1 ?'layui-show':''}">
                        <div class="layui-form" wid200="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-APP_ID</label>
                                <div class="layui-input-block">
                                    <input type="text" name="qcloud_appid" value="{$config_pri.qcloud_appid}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-SECRET_ID</label>
                                <div class="layui-input-block">
                                    <input type="text" name="qcloud_secretid" value="{$config_pri.qcloud_secretid}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-SECRET_KEY</label>
                                <div class="layui-input-block">
                                    <input type="text" name="qcloud_secretkey" value="{$config_pri.qcloud_secretkey}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-BUCKET</label>
                                <div class="layui-input-block">
                                    <input type="text" name="cos_bucket" value="{$config_pri.cos_bucket}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-REGION</label>
                                <div class="layui-input-block">
                                    <input type="text" name="cos_region" value="{$config_pri.cos_region}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-APP授权文件夹</label>
                                <div class="layui-input-block">
                                    <input type="text" name="cos_appfolder" value="{$config_pri.cos_appfolder}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-图片存放文件夹</label>
                                <div class="layui-input-block">
                                    <input type="text" name="cos_folder_image" value="{$config_pri.cos_folder_image}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云COS-模糊图片存放文件夹</label>
                                <div class="layui-input-block">
                                    <input type="text" name="cos_folder_blurimage"
                                        value="{$config_pri.cos_folder_blurimage}" class="layui-input"
                                        lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <!--这个地方多加一个表单是区分写日志用-->
                                    <input type="hidden" name="edit_type" value="live">
                                    <button class="layui-btn" lay-submit="" lay-filter="configpri-save">确认保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item {$type==2 ?'layui-show':''}">
                        <div class="layui-form" wid200="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云IM-APPID</label>
                                <div class="layui-input-block">
                                    <input type="text" name="im_sdkappid" value="{$config_pri.im_sdkappid}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云IM-SECRET</label>
                                <div class="layui-input-block">
                                    <input type="text" name="im_sdksecret" value="{$config_pri.im_sdksecret}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云IM-管理员</label>
                                <div class="layui-input-block">
                                    <input type="text" name="txim_admin" value="{$config_pri.txim_admin}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云IM-广播账号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="txim_broadcast" value="{$config_pri.txim_broadcast}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-APP_ID</label>
                                <div class="layui-input-block">
                                    <input type="text" name="qcloud_live_appid" value="{$config_pri.qcloud_live_appid}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-SECRET_ID</label>
                                <div class="layui-input-block">
                                    <input type="text" name="qcloud_live_secretid"
                                        value="{$config_pri.qcloud_live_secretid}" class="layui-input"
                                        lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-SECRET_KEY</label>
                                <div class="layui-input-block">
                                    <input type="text" name="qcloud_live_secretkey"
                                        value="{$config_pri.qcloud_live_secretkey}" class="layui-input"
                                        lay-verify="required">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-推流地址</label>
                                <div class="layui-input-block">
                                    <input type="text" name="push_domain" value="{$config_pri.push_domain}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-拉流地址</label>
                                <div class="layui-input-block">
                                    <input type="text" name="pull_domain" value="{$config_pri.pull_domain}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-推流防盗链Key</label>
                                <div class="layui-input-block">
                                    <input type="text" name="push_key" value="{$config_pri.push_key}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">腾讯云直播-拉流防盗链Key</label>
                                <div class="layui-input-block">
                                    <input type="text" name="pull_key" value="{$config_pri.pull_key}"
                                        class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <!--这个地方多加一个表单是区分写日志用-->
                                    <input type="hidden" name="edit_type" value="live">
                                    <button class="layui-btn" lay-submit="" lay-filter="configpri-save">确认保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item {$type==3 ?'layui-show':''}">
                        <div class="layui-form" wid200="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">基础热度范围</label>
                                <div class="layui-input-inline" style="width:85px">
                                    <input type="text" name="baseheats_start" value="{$config_pri.baseheats_start}"
                                        class="layui-input" lay-verify="required|intnum" placeholder="">
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline" style="width:85px">
                                    <input type="text" name="baseheats_end" value="{$config_pri.baseheats_end}"
                                        class="layui-input" lay-verify="required|intnum" placeholder="">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">主播等级系数</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="hot_anchor_level" value="{$config_pri.hot_anchor_level}"
                                        class="layui-input" lay-verify="required|intnum" placeholder="">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">直播间用户数量系数</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="hot_live_general_user"
                                        value="{$config_pri.hot_live_general_user}" class="layui-input"
                                        lay-verify="required|intnum" placeholder="">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">直播间弹幕系数</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="hot_pop_msg" value="{$config_pri.hot_pop_msg}"
                                        class="layui-input" lay-verify="required|intnum" placeholder="">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">直播间礼物系数</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="gift_factor" value="{$config_pri.gift_factor}"
                                        class="layui-input" lay-verify="required|intnum" placeholder="">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">直播时长(分钟)系数</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="hot_live_time" value="{$config_pri.hot_live_time}"
                                        class="layui-input" lay-verify="required|intnum" placeholder="">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <!--这个地方多加一个表单是区分写日志用-->
                                    <input type="hidden" name="edit_type" value="live">
                                    <button class="layui-btn" lay-submit="" lay-filter="configpri-save">确认保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '/layuiadmin/'
            , version: "{:config('other.ui_version')}"
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'setting', 'form'], function () {
            var form = layui.form
                , layer = layui.layer
            //自定义验证规则
            form.verify({
                intnum: function (value) {
                    if (!(/(^\d*$)/.test(value))) {
                        return '必须为正整数数字';
                    }
                }
            });
        });
    </script>
</body>

</html>